package HttpUtil;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

public class HttpUtil {
	/**
	 * 设置 request Attitude
	 * @author Administrator
	 * @date  2017年8月23日 下午11:28:56
	 * @version v1.0
	 * @param val
	 */
	public static void setAttribute(Object... val){
		HttpServletRequest request = ServletActionContext.getRequest();
		if(val != null){
			for(int i=0,len=val.length; i<len; i+=2){
				request.setAttribute((String)val[i], val[i+1]);
			}
		}
	}
}
